﻿@model MVC_Tutorial.Models.BlogPost


<hgroup class="title">
    <h2>@Html.ActionLink(Model.Title, "Post", "Home", new {id=Model.Id}, null)</h2>
</hgroup>


<fieldset>
    <legend>BlogPost</legend>

     <div class="display-label">
         @Html.DisplayNameFor(model => model.Date)
         <div class="display-field">
        @Html.DisplayFor(model => model.Date)
        </div>
    </div>
   
    <div class="display-label">
         @Html.DisplayNameFor(model => model.Author.Name)
         <div class="display-field">
        @Html.DisplayFor(model => model.Author.Name)
        </div>
    </div>

    <div class="display-field">
        @Html.DisplayFor(model => model.Body)
    </div>
</fieldset>
@if(Roles.IsUserInRole("Author")){
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) |
</p>
}